package com.zhudeshuai.zhudemolist.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.SeekBar;

import com.zhudeshuai.zhudemolist.R;
import com.zhudeshuai.zhudemolist.base.BaseActivity;
import com.zhudeshuai.zhudemolist.widget.CustomerProcess.CircleProcessView;

/**
 * @author zhudeshuai
 * @since 16/6/29
 */
public class CustomerViewActivity extends BaseActivity {
    private CircleProcessView mProcessView;
    private SeekBar mSeekBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_customer);
        mProcessView = (CircleProcessView) findViewById(R.id.processView);
        mSeekBar = (SeekBar) findViewById(R.id.seekBar);
        mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                mProcessView.setProcess(progress);
            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {

            }

            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {

            }
        });
        mProcessView.setProcess(0);
    }

    public static void open(Activity activity) {
        activity.startActivity(new Intent(activity, CustomerViewActivity.class));
    }
}
